package cn.edu.zafu.bigdata.psy;

class Vehicle {
    public void move() {
        System.out.println("Vehicle is moving");
    }
}
class Car extends Vehicle {
    public void move() {
        System.out.println("Car is moving");
    }
}
class Bicycle extends Vehicle {
    public void move() {
        System.out.println("Bicycle is moving");
    }
}
public class Question4 {
    public static void main(String[] args) {
        Vehicle[] vehicles = new Vehicle[3];
        vehicles[0] = new Vehicle();
        vehicles[1] = new Car();
        vehicles[2] = new Bicycle();

        for (Vehicle vehicle : vehicles) {
            vehicle.move();
        }
    }
}